package com.kancy.streamplus.channel;


import com.fasterxml.jackson.annotation.JsonIgnore;

import java.time.Duration;

/**
 * @author kancy
 * @date 2019/12/19 22:06
 **/
public abstract class AbstractDynamicDelayPollingMessage extends AbstractPollingMessage
        implements DynamicDelayPollingMessage {

    @JsonIgnore
    private Duration delay = Duration.ofSeconds(0);

    /**
     * 获取延时
     *
     * @return
     */
    @JsonIgnore
    @Override
    public Duration getDelay() {
        return delay;
    }

    @JsonIgnore
    public void setDelay(Duration delay) {
        this.delay = delay;
    }
}
